#include "BaseGameEntity.h"
#include "Render/Visual.h"

int BaseGameEntity::m_nextValidID = 0;

BaseGameEntity::BaseGameEntity(ENTITYTYPE type,Visual* pVisual)
{
	m_ID = m_nextValidID++;
	m_entityType = type;
	m_cellPos = Vector2Di(0,0);
	m_canDel = false;
	m_pVisual = pVisual;
}

Vector2Di BaseGameEntity::GetPos()
{
	return m_cellPos;
}

void BaseGameEntity::SetPos(const Vector2Di &new_pos)
{
	m_cellPos = new_pos;
}

bool BaseGameEntity::CanDelete()
{
	return m_canDel;
}

void BaseGameEntity::SetDel(bool del)
{
	m_canDel = del;
}

int BaseGameEntity::GetID()
{
	return m_ID;
}

int BaseGameEntity::GetEntityType()
{
	return m_entityType;
}

BaseGameEntity::~BaseGameEntity()
{

}

void BaseGameEntity::Render(int delta) const
{
	m_pVisual->Render(delta);
}

Visual* BaseGameEntity::GetVisual() const
{
	return m_pVisual;
}